import { createApp } from 'vue'
import App from '@/App.vue'
// 引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// svg需要的配置项
import 'virtual:svg-icons-register'

// 引入element-plus国际化
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-expect-error @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 暗黑模式需要的样式
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@/styles/index.scss'
import router from  './router'
import pinia from './store'
import globalComponents from '@/components/index'
// 获取应用实例对象
const app = createApp(App)
// 安装element-plus插件
app.use(ElementPlus, {
    locale: zhCn // element-plus国际化配置
})
app.use(pinia)
app.use(router)
app.use(globalComponents)
// import './permission'
// 将应用挂载到挂载点上
app.mount('#app')
